from django.core.management.base import BaseCommand
from sys import stdin, stdout, stderr
import datetime
from nstat.traffic.models import UserProfile, BadLine, TrafficCategory, \
    TariffRule
from django.conf import settings

DEBUG = settings.DEBUG

class Command(BaseCommand):
    help = "calls .update_firewall() for each UserProfile instance"

    def handle(self, **options):
        for u in UserProfile.objects.all():
            print u
            u.update_firewall()
